// app.js
App({
  onLaunch() {
    // 登录
    wx.login({
      success: res => {
        // 发送 res.code 到后台换取 openId, sessionKey, unionId
      }
    })
    const { model, system, statusBarHeight } = wx.getSystemInfoSync()
    let headHeight
    if (/iphone\s{0,}x/i.test(model)) {
      headHeight = 88
    } else if (system.indexOf('Android') !== -1) {
      headHeight = 68
    } else {
      headHeight = 64
    }

    this.globalData.headerHeight = headHeight
    this.globalData.statusBarHeight = statusBarHeight
  },
  globalData: { 
    headerHeight: 0,
    statusBarHeight: 0,
    userInfo: null,
    deviceId:'5C:F8:21:8A:D6:6C',//'A4:D5:78:63:FB:5A',
    openlockkey:'08080607',
    deviceCode:'ddsfsdfr2332432'
  }
})
